package day03;

import java.util.Scanner;

public class GuessNumber {
	public static void main(String[] args) {
		int a, b, c = 0;
		a = (int) (Math.random() * 1000);
		Scanner sca = new Scanner(System.in);
		System.out.println("请输入你的答案：");
		for (int i = 1; i <= 10; i++) {
			// b=sca.nextInt();
			System.out.println("你还有" + (10 - c) + "次机会");
			b = sca.nextInt();
			// c=c++;
			if (a < b) {
				System.out.println("太大了，再小一点！：");
			} else if (a > b) {
				System.out.println("太小了，再大一点！：");
			} else {
				System.out.println("you are so smart !!");
				System.exit(0);
				// break;
			}
			c++;

		}
		System.out.println("你太笨了，十次都猜不中阿！");
		System.exit(0);
	}
}
